package casino;

import java.awt.Graphics2D;

import containers.CardContainer;


public class GameCard extends Card {
	public Casino casino;
	public CardContainer parent;
	public boolean visible = true;
	public boolean accesible = true;
	
	public GameCard(Casino c, CardContainer con, Card card){
		super(card.value, card.suit, card.front);
		casino = c;
		parent = con;
	}
	
	public void draw(Graphics2D g){
		if(visible){
			if(faceUp){
				g.drawImage(front, x, y, front.getWidth(), front.getHeight(), casino);
			}else{
				g.drawImage(back, x, y, width, height, casino);
			}
		}
	}
	
	public void setCard(Card c){
		value = c.value;
		suit = c.suit;
		front = c.front;
	}
	
	public String toString(){
		return value+" of "+suit;
	}
	
	public void setParent(CardContainer p){
		parent = p;
	}
}
